﻿if exists (select 1
            from  sysobjects
           where  id = object_id('t_product_express')
            and   type = 'U')
   drop table t_product_express
go

/*==============================================================*/
/* Table: t_product_express                                     */
/*==============================================================*/
create table t_product_express (
   id                   bigint               identity,
   created_time         datetime             not null,
   created_by           bigint               not null,
   last_updated_time    datetime             null,
   last_updated_by      bigint               null,
   product_id           varchar(16)          null,
   delivery_status      tinyint              null,
   delivery_text        nvarchar(32)         null,
   postage_status       tinyint              null,
   postage_text         nvarchar(16)         null,
   postage_text_desc    nvarchar(64)         null,
   post_type            tinyint              null,
   no_postage_area      nvarchar(256)         null,
   constraint PK_T_PRODUCT_EXPRESS primary key (id)
)
go

if exists (select 1 from  sys.extended_properties
           where major_id = object_id('t_product_express') and minor_id = 0)
begin 
   declare @CurrentUser sysname 
select @CurrentUser = user_name() 
execute sp_dropextendedproperty 'MS_Description',  
   'user', @CurrentUser, 'table', 't_product_express' 
 
end 


select @CurrentUser = user_name() 
execute sp_addextendedproperty 'MS_Description',  
   '商品物流表', 
   'user', @CurrentUser, 'table', 't_product_express'
go
